package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.distribution.DistributionSubstations;
import com.ruoyi.system.mapper.distribution.DistributionSubstationsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.system.service.IDistributionSubstationsService;

/**
 * 分站分销收益Service业务层处理
 *
 * @author ruoyi
 * @date 2021-03-12
 */
@Service
public class DistributionSubstationsServiceImpl implements IDistributionSubstationsService
{
    @Autowired
    private DistributionSubstationsMapper distributionSubstationsMapper;

    /**
     * 查询分站分销收益
     *
     * @param distriSubId 分站分销收益ID
     * @return 分站分销收益
     */
    @Override
    public DistributionSubstations selectDistributionSubstationsById(Long distriSubId)
    {
        return distributionSubstationsMapper.selectDistributionSubstationsById(distriSubId);
    }

    /**
     * 查询分站分销收益列表
     *
     * @param distributionSubstations 分站分销收益
     * @return 分站分销收益
     */
    @Override
    public List<DistributionSubstations> selectDistributionSubstationsList(DistributionSubstations distributionSubstations)
    {
        return distributionSubstationsMapper.selectDistributionSubstationsList(distributionSubstations);
    }

    /**
     * 新增分站分销收益
     *
     * @param distributionSubstations 分站分销收益
     * @return 结果
     */
    @Override
    public int insertDistributionSubstations(DistributionSubstations distributionSubstations)
    {
        return distributionSubstationsMapper.insertDistributionSubstations(distributionSubstations);
    }

    /**
     * 修改分站分销收益
     *
     * @param distributionSubstations 分站分销收益
     * @return 结果
     */
    @Override
    public int updateDistributionSubstations(DistributionSubstations distributionSubstations)
    {
        return distributionSubstationsMapper.updateDistributionSubstations(distributionSubstations);
    }

    /**
     * 批量删除分站分销收益
     *
     * @param distriSubIds 需要删除的分站分销收益ID
     * @return 结果
     */
    @Override
    public int deleteDistributionSubstationsByIds(Long[] distriSubIds)
    {
        return distributionSubstationsMapper.deleteDistributionSubstationsByIds(distriSubIds);
    }

    /**
     * 删除分站分销收益信息
     *
     * @param distriSubId 分站分销收益ID
     * @return 结果
     */
    @Override
    public int deleteDistributionSubstationsById(Long distriSubId)
    {
        return distributionSubstationsMapper.deleteDistributionSubstationsById(distriSubId);
    }

    @Override
    public int findAllSum(DistributionSubstations distributionSubstations) {
        return distributionSubstationsMapper.findAllSum(distributionSubstations);
    }

    @Override
    public List<DistributionSubstations> findAllSumTwo(DistributionSubstations distributionSubstations) {
        return distributionSubstationsMapper.findAllSumTwo(distributionSubstations);
    }
}
